package com.appwoo.txtws.component;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.TimeZone;

public class GetDateTime
{
  public static Boolean compareDate(String paramString)
  {
    Object localObject = Boolean.valueOf(false);
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    localSimpleDateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
    Date localDate1 = new Date();
    try
    {
      Date localDate2 = localSimpleDateFormat.parse(paramString);
      Logger.e("tag", "锁屏时间为：" + localSimpleDateFormat.format(localDate2));
      Boolean localBoolean2;
      if (localDate2.getTime() <= localDate1.getTime())
        localBoolean2 = Boolean.valueOf(true);
      Boolean localBoolean1;
      for (localObject = localBoolean2; ; localObject = localBoolean1)
      {
        Logger.e("tag", "当前时间：" + localSimpleDateFormat.format(localDate1) + "结果：" + localObject);
        return localObject;
        localBoolean1 = Boolean.valueOf(false);
      }
    }
    catch (ParseException localParseException)
    {
      while (true)
      {
        localParseException.printStackTrace();
        Logger.e("tag", localParseException.getMessage());
      }
    }
  }

  public static String dateToStr(Date paramDate)
  {
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
    localSimpleDateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
    return localSimpleDateFormat.format(paramDate);
  }

  public static int findMaxDayInMonth(int paramInt1, int paramInt2)
  {
    Calendar localCalendar = Calendar.getInstance();
    if (paramInt1 > 0)
      localCalendar.set(1, paramInt1);
    if (paramInt2 > 0)
      localCalendar.set(2, paramInt2 - 1);
    return findMaxDayInMonth(localCalendar);
  }

  public static int findMaxDayInMonth(Calendar paramCalendar)
  {
    if (paramCalendar == null)
      return 0;
    return paramCalendar.getActualMaximum(5);
  }

  public static String getDate()
  {
    Date localDate = new Date();
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
    localSimpleDateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
    return localSimpleDateFormat.format(localDate);
  }

  public static String getDate(Date paramDate, long paramLong)
  {
    Date localDate = new Date(paramDate.getTime() + 86400000L * paramLong);
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
    localSimpleDateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
    return localSimpleDateFormat.format(localDate);
  }

  public static String getDateTime()
  {
    Date localDate = new Date();
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    localSimpleDateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
    return localSimpleDateFormat.format(localDate);
  }

  public static String getDayOfMon()
  {
    Date localDate = new Date();
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("dd");
    localSimpleDateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
    return localSimpleDateFormat.format(localDate);
  }

  public static String getLastDayOfWeek()
  {
    GregorianCalendar localGregorianCalendar = new GregorianCalendar();
    localGregorianCalendar.setFirstDayOfWeek(1);
    localGregorianCalendar.setTime(new Date(System.currentTimeMillis()));
    localGregorianCalendar.set(7, 7);
    Logger.d("xjf", "当前所在周的最后一天:" + localGregorianCalendar.getTime().toString());
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
    localSimpleDateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
    return localSimpleDateFormat.format(localGregorianCalendar.getTime());
  }

  public static String getMonth()
  {
    Date localDate = new Date();
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("MM");
    localSimpleDateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
    return localSimpleDateFormat.format(localDate);
  }

  public static String getTime()
  {
    Date localDate = new Date();
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("HH:mm:ss ");
    localSimpleDateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
    return localSimpleDateFormat.format(localDate);
  }

  public static String getYear()
  {
    Date localDate = new Date();
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy");
    localSimpleDateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
    return localSimpleDateFormat.format(localDate);
  }

  public static Date transDate(String paramString)
  {
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
    try
    {
      Date localDate = localSimpleDateFormat.parse(paramString);
      return localDate;
    }
    catch (ParseException localParseException)
    {
      localParseException.printStackTrace();
    }
    return null;
  }

  public static Date transDateTime(String paramString)
  {
    if (paramString == null)
      paramString = getDateTime();
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    try
    {
      Date localDate = localSimpleDateFormat.parse(paramString);
      return localDate;
    }
    catch (ParseException localParseException)
    {
      localParseException.printStackTrace();
    }
    return null;
  }

  public static Date transTime(String paramString)
  {
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("HH:mm:ss");
    try
    {
      Date localDate = localSimpleDateFormat.parse(paramString);
      return localDate;
    }
    catch (ParseException localParseException)
    {
      localParseException.printStackTrace();
    }
    return null;
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.component.GetDateTime
 * JD-Core Version:    0.6.2
 */